package top.wshape1.shiziapi.common.exception;

import lombok.Getter;
import top.wshape1.shiziapi.common.utils.R;

/**
 * @author Wshape1
 * @version 1.0
 * @description
 * @since 2023-08-24
 */

@Getter
public class CustomException extends RuntimeException {

    private final R<?> r;

    public CustomException(String message) {
        super(message);
        this.r = R.error(message);
    }

    public CustomException(R<?> r) {
        this.r = r;
    }

}
